﻿var titBook = titBook || {};
titBook.viewModels = titBook.viewModels || {};

(function (viewModels) {
    viewModels.rightContentViewModel = kendo.data.ObservableObject.extend({
        ajaxData: {},
        
        init: function (sandbox, dataUpdateCallback) {
            var me = this;
            kendo.data.ObservableObject.fn.init.call(me, {});
            me.set("sandbox", sandbox);
            //router.route("/:category/:routerID", function (category, routerID) {
            //    me.getData(null, 1, dataUpdateCallback);
            //});
            me.getData(null, 2, dataUpdateCallback);
        },

        getData: function (successCallback, id, dataUpdateCallback) {
            if (!id) {id = 1;}
            //var self = this;
            titBook.core.proxy.sendRequest("GetRightMenuItems", titBook.core.constants.httpVerbs.get, dataUpdateCallback, "id=" + id);
        },
    });
})(titBook.viewModels);